package com.morehair.mapper;

import com.morehair.bean.pojo.User;
import com.morehair.bean.pojo.UserExample;
import com.morehair.bean.pojo.UserStat;
import com.morehair.bean.vo.admin.OrderDetailByUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    OrderDetailByUserVo selectUserById(Integer userId);


    List<UserStat> selectUserStat();

    Integer selectByUsername(String username);

    Integer selectByPhoneNumber(String mobile);

    void updatePassword(String mobile, String password);

    User selectLatestUser();

}